package ${packageName}.entity;

<#-- 导入列表 -->
<#list importList as import>
import ${import};
</#list>
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.*;

import com.hgyc.mom.common.annotation.Excel;
import com.hgyc.mom.core.mybatis.EQ;
import com.hgyc.mom.core.mybatis.Like;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

<#-- 类注释 -->
/**
 * <p>
 * ${functionName}
 * </p>
 *
 * @author ${author}
 * @since ${datetime}
*/
@Data
@TableName("${tableName}")
@Schema(name="${functionName}对象", description="${functionName}对象")
public class ${ClassName} implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

<#-- 字段循环 -->
<#list columns as column>
    <#if column.list!false>
        <#assign comment = column.columnComment!''>
        <#if column.columnComment?contains("（")>
            <#assign comment = column.columnComment?substring(0, column.columnComment?index_of("（"))>
        </#if>
        <#if column.columnComment?contains("（")>
            <#if column.readConverterExp?has_content>
    @Excel(name = "${comment}", readConverterExp = "${column.readConverterExp}")
            </#if>
        <#elseif column.javaType == 'Date'>
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
        <#else>
    @Excel(name = "${comment}")
        </#if>
    </#if>
    <#if column.isPk()>
    @TableId(value = "${column.columnName}", type = IdType.ASSIGN_ID)
    </#if>
    <#if column.columnName == "create_by" || column.columnName == "create_time">
    @TableField(fill = FieldFill.INSERT)
    </#if>
    <#if column.columnName == "update_by" || column.columnName == "update_time">
    @TableField(fill = FieldFill.UPDATE)
    </#if>
    <#if column.isQuery()>
        <#if column.queryType == "Like">
    @Like
        <#elseif column.queryType == "!=">
    @NE
        <#elseif column.queryType == "IN">
    @IN
        <#else>
    @EQ
        </#if>
    </#if>
    @Schema(description = "${column.columnComment!''}")
    private ${column.javaType} ${column.javaField};

<#if tplCategory == "tree">
    @TableField(exist = false)
    private List<${ClassName}> children;
</#if>
</#list>
}